package cn.cicoding.mybatis.service;

import cn.cicoding.mybatis.bean.UserExcel;

import javax.servlet.ServletOutputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * created with IntelliJ IDEA.
 * author: cicoding
 * date: 2020/03/18
 * version: 1.0
 * description:
 */
public interface ExcelUserService {

    Object listAll(int page, int size);

    int insert();

    int remove(Integer userId);

    int update(UserExcel user);

    void downloadExcel(ServletOutputStream outputStream);
    void downloadMultithreadingExcel(ServletOutputStream outputStream);


    void upload(InputStream inputStream) throws IOException;

    void downloadExcels(ServletOutputStream outputStream);

    /**
     * 触发异步后台导出操作
     * @param userId
     */
    String exportDataAsync(String userId);

    /**
     * 用户主动请求下载
     * @param userId
     * @return
     */
    String getFilePathByUserId(String userId);

}
